package a.j;

import a.d.t;

import java.awt.*;
import java.awt.geom.GeneralPath;

public class je
  implements jd.g_
{
  public static final byte a = 0;
  public static final byte b = 1;
  public static final byte c = 2;
  private final jd.g_ d;
  private final BasicStroke e;
  private byte f;
  public static int g;
  
  public je(jd.g_ paramg_)
  {
    this.d = paramg_;
    this.e = new BasicStroke();
  }
  
  public byte a()
  {
    return this.f;
  }
  
  public void a(byte paramByte)
  {
    if (!ld.E) {}
    switch (paramByte)
    {
    case 0: 
    case 1: 
    case 2: 
      this.f = paramByte;
      if (!ld.D) {
        break;
      }
    default: 
      throw new IllegalArgumentException("Unsupported style: " + paramByte);
    }
  }
  
  public void a(jd paramjd, Graphics2D paramGraphics2D)
  {
    if (!ld.E) {
      if (this.d != null) {
        this.d.a(paramjd, paramGraphics2D);
      }
    }
    a(paramjd, paramGraphics2D, false);
  }
  
  private void a(jd paramjd, Graphics2D paramGraphics2D, boolean paramBoolean)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if ((bool2) || (jd.a(paramjd, paramGraphics2D)))
    {
      t localt = paramjd.o();
      double d1 = localt.d() - 3.0D;
      double d2 = localt.e() - 3.0D;
      double d3 = localt.b() + 6.0D;
      double d4 = localt.c() + 6.0D;
      Object localObject;
      switch (a())
      {
      case 0: 
        double d5 = Math.min(d3 * 0.2D, 3.0D);
        double d6 = Math.min(d4 * 0.2D, 3.0D);
        double d7 = Math.min(d5, d6);
        double d8 = d7;
        double d9 = d7;
        GeneralPath localGeneralPath = new GeneralPath();
        localGeneralPath.reset();
        localGeneralPath.moveTo((float)(d1 + d3 * 0.5D - d8), (float)d2);
        localGeneralPath.lineTo((float)(d1 + d3 * 0.5D), (float)(d2 - 3.0D));
        localGeneralPath.lineTo((float)(d1 + d3 * 0.5D + d8), (float)d2);
        localGeneralPath.moveTo((float)(d1 + d3), (float)(d2 + d4 * 0.5D - d9));
        localGeneralPath.lineTo((float)(d1 + d3 + 3.0D), (float)(d2 + d4 * 0.5D));
        localGeneralPath.lineTo((float)(d1 + d3), (float)(d2 + d4 * 0.5D + d9));
        localGeneralPath.moveTo((float)(d1 + d3 * 0.5D + d8), (float)(d2 + d4));
        localGeneralPath.lineTo((float)(d1 + d3 * 0.5D), (float)(d2 + d4 + 3.0D));
        localGeneralPath.lineTo((float)(d1 + d3 * 0.5D - d8), (float)(d2 + d4));
        localGeneralPath.moveTo((float)d1, (float)(d2 + d4 * 0.5D + d9));
        localGeneralPath.lineTo((float)(d1 - 3.0D), (float)(d2 + d4 * 0.5D));
        localGeneralPath.lineTo((float)d1, (float)(d2 + d4 * 0.5D - d9));
        localObject = localGeneralPath;
        if (!bool1) {
          break;
        }
      case 1: 
        localObject = new Rectangle2D.Double(d1, d2, d3, d4);
        if (!bool1) {
          break;
        }
      case 2: 
        double d10 = Math.min(8.0D, Math.max(2.0D, Math.min(d3, d4) * 0.25D));
        localObject = new RoundRectangle2D.Double(d1, d2, d3, d4, d10, d10);
        if (!bool1) {
          break;
        }
      default: 
        throw new IllegalStateException("Unsupported style: " + a());
      }
      Color localColor = paramGraphics2D.getColor();
      Stroke localStroke = paramGraphics2D.getStroke();
      if (!bool2)
      {
        if (a(paramjd.b(), paramjd, paramGraphics2D)) {
          paramGraphics2D.draw((Shape)localObject);
        }
        paramGraphics2D.setStroke(localStroke);
      }
      paramGraphics2D.setColor(localColor);
    }
  }
  
  protected boolean a(ld paramld, jd paramjd, Graphics2D paramGraphics2D)
  {
    paramGraphics2D.setColor(Color.BLACK);
    paramGraphics2D.setStroke(this.e);
    return true;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.je

 * JD-Core Version:    0.7.0.1

 */